let teacher=new Vue({
    el:"#tea",
    data:{
        teachers: [],
        pageinfo:{}
    },
    methods:{
        loadTeachers:function (pageNum) {
                if (!pageNum){
                    pageNum=1;
                }
            axios({
                url:'/edu/dfTeachersInfo/teacher_list_page',
                method:"GET",
                params:{
                    pageNum:pageNum
                }
            }).then(function (response) {

                 teacher.teachers = response.data.list;
                 teacher.pageinfo=response.data;

            })
        }
    },

    /*页面加载完时自动执行created方法,然后执行里面的内容*/
    created:function () {
        console.log("执行过")
        this.loadTeachers(1);
    }

});

let teacherlist=new Vue({
    el:"#tlist",
    data:{
        list:[],
    },
    methods:{
        loadlist:function (num) {
            if (num!=null){
                num=5;
            }
            axios({
                url:"/edu/dfTeachersInfo/teacher_list",
                method: "GET",

            }).then(function (response) {
                teacherlist.list=response.data;
            })
        },
        created:function () {
            this.loadlist(5);
        }
    }
});